<template>
	<view>
		<view class="name">
			<input type="text" v-model="value">
		</view>
		<view class="btn" @click="submit">确定</view>
	</view>
</template>

<script>
	import {saveUserInfo} from "@/api/shop";
	export default {
	      data() {
	        return {
	          value: ''
	        }
	      },
	      methods: {
			  async submit(){
				  let params = {
					  avatarUrl:'https://192.168.2.12/appdata/xiangru-app/uploadPath/upload/2025/05/03/a49890c2847588fa3f152fa0b1097ecf__20250503111130A011.jpg',
					  // /appdata/xiangru-app/uploadPath/upload/2025/05/03/a49890c2847588fa3f152fa0b1097ecf__20250503111130A011.jpg
					  nickName:this.value,
					  userId:1
				  }
				  let res = await saveUserInfo(params)
			  },
	        change(e) {
	          console.log('change', e);
	        }
	      }
		}
</script>

<style lang="scss" scoped>
	.name{
		width:95%;
		margin: 20px auto;
		height:50px;
		border-bottom:1px solid #eee;
		input{
			width:100%;
			
			height:100%;
			border:none;
		}
	}
	.btn{
		width:95%;
		margin: 0 auto;
		height:40px;
		background-color: skyblue;
		text-align: center;
		line-height: 40px;
		border-radius: 5px;
		font-size: 16px;
		color:#fff;
	}
</style>